/**
 * Project:   dtu.fmes.googleloon
 * File:      AirPumpModule.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Bartosz Cichecki [ cichecki.bartosz@gmail.com ]
 * 				Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.model.balloon;

/**
 * 
 * @author Bartosz Cichecki, Nicolai Sonne
 */
public class AirPumpModule {

	private Double risingSpeed;

	private Double risingPowerUsage;

	private Double fallingSpeed;

	private Double fallingPowerUsage;

	private Double weight;

	public AirPumpModule() {

	}

	public AirPumpModule(Double risingSpeed, Double risingPowerUsage, Double fallingSpeed, Double fallingPowerUsage, Double weight) {
		super();
		this.risingSpeed = risingSpeed;
		this.risingPowerUsage = risingPowerUsage;
		this.fallingSpeed = fallingSpeed;
		this.fallingPowerUsage = fallingPowerUsage;
		this.weight = weight;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		AirPumpModule other = (AirPumpModule) obj;
		if (fallingPowerUsage == null) {
			if (other.fallingPowerUsage != null) {
				return false;
			}
		} else if (!fallingPowerUsage.equals(other.fallingPowerUsage)) {
			return false;
		}
		if (fallingSpeed == null) {
			if (other.fallingSpeed != null) {
				return false;
			}
		} else if (!fallingSpeed.equals(other.fallingSpeed)) {
			return false;
		}
		if (risingPowerUsage == null) {
			if (other.risingPowerUsage != null) {
				return false;
			}
		} else if (!risingPowerUsage.equals(other.risingPowerUsage)) {
			return false;
		}
		if (risingSpeed == null) {
			if (other.risingSpeed != null) {
				return false;
			}
		} else if (!risingSpeed.equals(other.risingSpeed)) {
			return false;
		}
		if (weight == null) {
			if (other.weight != null) {
				return false;
			}
		} else if (!weight.equals(other.weight)) {
			return false;
		}
		return true;
	}

	public Double getFallingPowerUsage() {
		return fallingPowerUsage;
	}

	public Double getFallingSpeed() {
		return fallingSpeed;
	}

	public Double getRisingPowerUsage() {
		return risingPowerUsage;
	}

	public Double getRisingSpeed() {
		return risingSpeed;
	}

	public Double getWeight() {
		return weight;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (fallingPowerUsage == null ? 0 : fallingPowerUsage.hashCode());
		result = prime * result + (fallingSpeed == null ? 0 : fallingSpeed.hashCode());
		result = prime * result + (risingPowerUsage == null ? 0 : risingPowerUsage.hashCode());
		result = prime * result + (risingSpeed == null ? 0 : risingSpeed.hashCode());
		result = prime * result + (weight == null ? 0 : weight.hashCode());
		return result;
	}

	public void setFallingPowerUsage(Double fallingPowerUsage) {
		this.fallingPowerUsage = fallingPowerUsage;
	}

	public void setFallingSpeed(Double fallingSpeed) {
		this.fallingSpeed = fallingSpeed;
	}

	public void setRisingPowerUsage(Double risingPowerUsage) {
		this.risingPowerUsage = risingPowerUsage;
	}

	public void setRisingSpeed(Double risingSpeed) {
		this.risingSpeed = risingSpeed;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	@Override
	public String toString() {
		return "AirPumpModule [risingSpeed=" + risingSpeed + ", risingPowerUsage=" + risingPowerUsage + ", fallingSpeed=" + fallingSpeed
		        + ", fallingPowerUsage=" + fallingPowerUsage + ", weight=" + weight + "]";
	}

}
